// 4-1 圆形体体积计算器
#include <stdio.h>

//解决精度问题,延长小数位数
#define PI 3.1415926535897932


double r,h;
void Ball(){
	printf("Please enter the radius:\n");
    scanf("%lf",&r);
    printf("%.2f\n",PI * 4 / 3 * r * r * r);
}
void Cylinder(){
 printf("Please enter the radius and the height:\n");
                scanf("%lf%lf",&r,&h);
                printf("%.2f\n",PI * r * r * h);
}
void Cone(){
    printf("Please enter the radius and the height:\n");
    scanf("%lf%lf",&r,&h);
    printf("%.2f\n",PI * r * r * h / 3);
}
int main() {
    int cmd,flag = 0;

    printf("1-Ball\n2-Cylinder\n3-Cone\nother-Exit\nPlease enter your command:\n");

    while(scanf("%d",&cmd)) {
        switch(cmd) {
            case 1:
                Ball();
                break;
            case 2:
                Cylinder();
                break;
            case 3:
            	Cone();
                break;
            default: 
				flag = 1;
        }
        if(flag) break;
        printf("1-Ball\n2-Cylinder\n3-Cone\nother-Exit\nPlease enter your command:\n");
    }
    return 0;
}